<template>
    <p class="read-the-docs">这是IndexDefineComponent页面</p>
    <button @click="btnClick">点击跳页</button>

  </template>
<script>
  import { defineComponent } from "vue";
  import { useRouter } from 'vue-router'

  export default defineComponent({
    name: 'ButtonMy',
   
    setup(props,context) {
      const router = useRouter()

      const btnClick = () => {
        router.push('/index')
      }
      return {
        btnClick,
      }
    }
  })
</script>
    
  <style scoped>
  .read-the-docs {
    color: #888;
  }
  </style>
  